package com.ws.q1.mapper;


import com.ws.q1.bean.GongYingShang;
import com.ws.q1.bean.YouQingLianJie;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface YouQingLianJieMapper {

    @Insert("insert into youqing(name,url) values(#{name},#{url})")
    int add(@Param("name") String name, @Param("url") String url);

    @Select("select * from youqing")
    List<YouQingLianJie> list();

    @Select("delete from youqing where id=#{id}")
    void deleteById(Integer id);


    @Select("update youqing set name=#{YouQingLianJie.name},url=#{YouQingLianJie.url} where id=#{id}")
    void update(@Param("id") Integer id, @Param("YouQingLianJie") YouQingLianJie youQingLianJie);

    @Select("select * from youqing where id=#{id}")
    YouQingLianJie huixian(Integer id);


}
